/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.univcasa.managing.impl;

import com.univcasa.db.model.CompteEtudiant;
import com.univcasa.managing.ComptesStudentsManager;
import com.univcasa.managing.LdapDBManager;
import java.util.Iterator;
import java.util.List;


/**
 *
 * @author issam
 */
public class testStudentLoginManager {

    public static void testListUidsLdap(String uidPattern){
        LdapDBManager managerLdap = new LdapDBManagerImpl();
        List lista = managerLdap.recupererListeUids(uidPattern);

        for(Iterator itr=lista.iterator(); itr.hasNext();){
            String uid = (String) itr.next();
            System.out.println("uid " + uid );
        }
    }

    public static void testListEntriesLdap(){

        LdapDBManager managerLdap = new LdapDBManagerImpl();
        List lista = managerLdap.recupererListeApogeeEtudiants();

        for(Iterator itr=lista.iterator(); itr.hasNext();){
            String apogee = (String) itr.next();
            System.out.println("entry " + apogee);
        }
    }

    public static void testAjoutListALdap(){

        /*ComptesStudentsManager manager = new ComptesStudentsManagerImpl();
        LdapDBManager managerLdap = new LdapDBManagerImpl();

        List lista = manager.getAllComptesStudents();

        for(Iterator itr=lista.iterator(); itr.hasNext();){

            CompteEtudiant etudiant = (CompteEtudiant) itr.next();
            System.out.println("etudiant " + etudiant.getApogee() +" " + etudiant.getNom() + " " + etudiant.getPrenom());

            managerLdap.ajoutCompteEtudiantLdap( etudiant );
        }**/
    }

    public static void main(String[] args){

        //testListUidsLdap("ens*9") ;
        testAjoutListALdap();
        testListUidsLdap("*") ;       
    }
}